RtfwModifyNetworkInterface
RtfwModifyNetworkInterface modifies the configuration of an existing real-time network interface in the RT-TCP/IP Stack.
Syntax
bool RtfwModifyNetworkInterface( const TCHAR * friendlyName, const RTFW_NETWORK_INTERFACE * pInterface, unsigned int reserved );
Parameters
friendlyName
A pointer to the friendly name in structure RTFW_NETWORK_INTERFACE of the network interface to be modified. This value is not case-sensitive.
pInterface
A pointer to a value that contains the new configuration parameters for the network interface. If member FriendlyName in this value differs from the current friendly name of the network interface, the friendly name is changed to the one specified via this parameter. The Size member must be set to sizeof(RTFW_NETWORK_INTERFACE), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
reserved
This parameter must always be set to zero.
Return Value
The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.
Possible error codes:
Error Code | Meaning |
---|---|
RT_ERROR_NETWORK_NOT_INSTALLED | The RT-TCP/IP Stack is not installed. |
RT_ERROR_REGISTRY_MISSING | A registry key or value is missing. |
RT_ERROR_RESTART_NETWORK |
The RT-TCP/IP Stack was running when this function succeeded. RtfwRestartRequired will report that the RT-TCP/IP Stack must be restarted. NOTE: The RT-TCP/IP Stack must be restarted for the change to take effect. |
RT_ERROR_STRUCTURE_TOO_SMALL | The Size member of a structure is too small. |
Remarks
If the RT-TCP/IP Stack is running when the RtfwModifyNetworkInterface API is called, the values set will not take effect until the stack is restarted.
Certain properties in structure RTFW_NETWORK_INTERFACE should not be modified if the interface belongs to the Virtual Network. See RTFW_NETWORK_INTERFACE for more information.
The RTX64 Native library does not check for duplicate IPv6 addresses on the local system during configuration of network interfaces. It does check for duplicate IPv4 addresses in RtfwCreateNetworkInterface and RtfwModifyNetworkInterface. Both functions will fail with custom error RT_ERROR_IPV4_ADDRESS_INVALID when a duplicate IPv4 address is detected.
Any pathname passed to this function must not be a network pathname. This includes:
- A pathname with a drive letter that specifies a mapped file share.
- A UNC path: a pathname that starts with \\servername.
Requirements
Minimum Required Version | RTX64 3.4 |
Header | RtfwAPI.h |
Library | RtfwAPI.lib |
See Also: